package hk.mrtomato.cal;

import java.util.Calendar;

public class CalBean {
	Calendar cal;
	private int year=0;
	private int month=0;
	public CalBean(){
		cal=Calendar.getInstance();
		year=cal.get(Calendar.YEAR);
		month=cal.get(Calendar.MONTH)+1;
	}//
	public int getYear() {
		return year;
	}
	public void setYear(int year) {
		this.year = year;
	}
	public int getMonth() {
		return month;
	}
	public void setMonth(int month) {
		this.month = month;
		if(month>12){
			year++;
			this.month=1;
		}else if(month<=0){
			year--;
			this.month=12;
		}
	}
}
